home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Ahoy 1987 March
/
Ahoy_Magazine_87-03_1987_Double_L.d64
/
Time Converter2
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-10-26
|
349b
|
12 lines
0 print"[147]":poke53280,0:poke53281,0:poke646,1
1 rem commodares problem #35-3:
2 rem time converter
3 rem solution by
4 rem leo brenneman
5 rem
10 input"time in decimal hours";h
20 h%=h : m=h-h% :m=m*60 : m%=m : s=m-m% : s=s*60 : s%=s : if s=>.5 then s%=s+1
30 if s%=>60 then m%=m%+1 : s%=0
40 if m%=>60 then h%=h%+1 : m%=0 : s%=0
50 print h% chr$(58) m% chr$(58) s%